import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLong()) { // 注意 while 处理多个 case
            long n = in.nextLong();
            long i = 1;
            long prev = 0;
            for (; i*i <= n; i++) {
                prev = i*i;
            }
            System.out.println(n-prev > i*i-n ? i*i : prev);
        }
    }
}
